﻿using SqlSugar;
using Zhp.SqlSugar.Entity;

namespace Zhp.Entity.Chat
{
    /// <summary>
    /// 好友表，A和B互为好友，存储A,B;B,A两条数据
    /// </summary>
    [SugarTable("Chat_Friend")]
    public class ChatFriend : BaseEntity<long>
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        [SugarColumn(ColumnDataType = "bigint", IsNullable = false, ColumnDescription = "用户ID")]
        public long UserId { get; set; }

        /// <summary>
        /// 好友用户ID
        /// </summary>
        [SugarColumn(ColumnDataType = "bigint", IsNullable = false, ColumnDescription = "好友用户ID")]
        public long FriendUserId { get; set; }

        /// <summary>
        /// 好友备注
        /// </summary>
        [SugarColumn(ColumnDataType = "nvarchar", Length = 10, IsNullable = true, ColumnDescription = "好友备注")]
        public string FriendNickName { get; set; }

        /// <summary>
        /// 互为好友共用ID,用作查询聊天记录
        /// </summary>
        [SugarColumn(ColumnDataType = "bigint", IsNullable = false, ColumnDescription = "互为好友共用ID,用作查询聊天记录")]
        public long PairID { get; set; }

    }
}
